/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "company_adquired_profile_folder_state_description")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CompanyAdquiredProfileFolderStateDescription.findAll", query = "SELECT c FROM CompanyAdquiredProfileFolderStateDescription c"),
    @NamedQuery(name = "CompanyAdquiredProfileFolderStateDescription.findByIdCompanyAdquiredProfileFolderStateDescription", query = "SELECT c FROM CompanyAdquiredProfileFolderStateDescription c WHERE c.idCompanyAdquiredProfileFolderStateDescription = :idCompanyAdquiredProfileFolderStateDescription"),
    @NamedQuery(name = "CompanyAdquiredProfileFolderStateDescription.findByDescription", query = "SELECT c FROM CompanyAdquiredProfileFolderStateDescription c WHERE c.description = :description")})
public class CompanyAdquiredProfileFolderStateDescription implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_COMPANY_ADQUIRED_PROFILE_FOLDER_STATE_DESCRIPTION")
    private Integer idCompanyAdquiredProfileFolderStateDescription;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "DESCRIPTION")
    private String description;
    @JoinColumn(name = "ID_COMPANY_ADQUIRED_PROFILE_FOLDER_STATE", referencedColumnName = "ID_COMPANY_ADQUIRED_PROFILE_FOLDER_STATE")
    @ManyToOne(optional = false)
    private CompanyAdquiredProfileFolderState idCompanyAdquiredProfileFolderState;
    @JoinColumn(name = "ID_LANGUAGE", referencedColumnName = "ID_LANGUAGE")
    @ManyToOne(optional = false)
    private Language idLanguage;

    public CompanyAdquiredProfileFolderStateDescription() {
    }

    public CompanyAdquiredProfileFolderStateDescription(Integer idCompanyAdquiredProfileFolderStateDescription) {
        this.idCompanyAdquiredProfileFolderStateDescription = idCompanyAdquiredProfileFolderStateDescription;
    }

    public CompanyAdquiredProfileFolderStateDescription(Integer idCompanyAdquiredProfileFolderStateDescription, String description) {
        this.idCompanyAdquiredProfileFolderStateDescription = idCompanyAdquiredProfileFolderStateDescription;
        this.description = description;
    }

    public Integer getIdCompanyAdquiredProfileFolderStateDescription() {
        return idCompanyAdquiredProfileFolderStateDescription;
    }

    public void setIdCompanyAdquiredProfileFolderStateDescription(Integer idCompanyAdquiredProfileFolderStateDescription) {
        this.idCompanyAdquiredProfileFolderStateDescription = idCompanyAdquiredProfileFolderStateDescription;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public CompanyAdquiredProfileFolderState getIdCompanyAdquiredProfileFolderState() {
        return idCompanyAdquiredProfileFolderState;
    }

    public void setIdCompanyAdquiredProfileFolderState(CompanyAdquiredProfileFolderState idCompanyAdquiredProfileFolderState) {
        this.idCompanyAdquiredProfileFolderState = idCompanyAdquiredProfileFolderState;
    }

    public Language getIdLanguage() {
        return idLanguage;
    }

    public void setIdLanguage(Language idLanguage) {
        this.idLanguage = idLanguage;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCompanyAdquiredProfileFolderStateDescription != null ? idCompanyAdquiredProfileFolderStateDescription.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CompanyAdquiredProfileFolderStateDescription)) {
            return false;
        }
        CompanyAdquiredProfileFolderStateDescription other = (CompanyAdquiredProfileFolderStateDescription) object;
        if ((this.idCompanyAdquiredProfileFolderStateDescription == null && other.idCompanyAdquiredProfileFolderStateDescription != null) || (this.idCompanyAdquiredProfileFolderStateDescription != null && !this.idCompanyAdquiredProfileFolderStateDescription.equals(other.idCompanyAdquiredProfileFolderStateDescription))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.CompanyAdquiredProfileFolderStateDescription[ idCompanyAdquiredProfileFolderStateDescription=" + idCompanyAdquiredProfileFolderStateDescription + " ]";
    }
    
}
